package com.zmn.oms.dubbo.impl.zmn.normal.orderpay;

import com.zmn.common.dto.ResponseDTO;
import com.zmn.common.utils.response.ResponseUtil;
import com.zmn.oms.business.interfaces.work.OrderWorkPositionBService;
import com.zmn.oms.dubbo.dto.common.orderpay.*;
import com.zmn.oms.dubbo.dto.common.work.BaseRequestDIO;
import com.zmn.oms.dubbo.impl.OmsBaseRemoteService;
import com.zmn.oms.dubbo.interfaces.zmn.normal.orderpay.ZsNormalOrderPayRemoteService;
import com.zmn.oms.dubbo.utils.DubboConsts;
import com.zmn.oms.services.interfaces.detail.OrderDetailService;
import com.zmn.oms.services.interfaces.product.OrderProductService;
import com.zmn.oms.services.interfaces.work.OrderWorkService;
import com.zmn.oms.third.dj58.service.DaoJia58Service;
import com.zmn.oms.third.yajule.service.YajuleService;
import com.zmn.oms.zmn.business.interfaces.work.ZsOrderWorkAmountBService;
import com.zmn.oms.zmn.business.interfaces.work.orderpay.ZsOrderPayBService;
import com.zmn.oms.zmn.normal.business.interfaces.work.masterwork.ZsNormalMasterWorkBService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 类描述：普通工单-金额支付
 *
 * @author heciqi
 * @date 2019/01/10 17:24
 */
@Slf4j
@Service(loadbalance = "roundrobin", timeout = 5000, retries = 2, version = DubboConsts.INTERFACE_VERSION, validation = "false")
public class ZsNormalOrderPayRemoteServiceImpl extends OmsBaseRemoteService implements ZsNormalOrderPayRemoteService {

	@Autowired
	private ZsOrderPayBService zsOrderPayBService;
	@Autowired
	private OrderWorkService orderWorkService;
	@Autowired
	private OrderDetailService orderDetailService;
	@Autowired
	private ZsNormalMasterWorkBService zsNormalMasterWorkBService;
	@Autowired
	private ZsOrderWorkAmountBService zsOrderWorkAmountBService;
	@Autowired
	private OrderProductService orderProductService;
	@Autowired
	private DaoJia58Service daoJia58Service;
	@Autowired
	private YajuleService yajuleService;
	@Autowired
	private OrderWorkPositionBService orderWorkPositionBService;


	/**
	 * 工单支付信息
	 * @param orderId
	 * @return
	 */
	@Override
	public com.zmn.common.dto2.ResponseDTO<OrderPayInfoDRO> getOrderPayInfo(Long orderId) {
		return com.zmn.common.dto2.ResponseDTO.fail("接口被废弃，请调新接口");
		//
		// logger.info("[{}]取工单支付信息", orderId);
		// OrderWork orderWork = orderWorkService.findOrderWorkByKeySrcMaster(orderId, orderId);
		// if (orderWork == null) {
		// 	return com.zmn.common.dto2.ResponseDTO.fail("工单不存在");
		// }
		//
		// OrderPayInfoDRO orderPayInfoDRO = new OrderPayInfoDRO();
		// orderPayInfoDRO.setOrderId(orderWork.getOrderId());
		// orderPayInfoDRO.setWorkId(orderWork.getWorkId());
		// // 商品名称
		// String showProductName = "家电维修";
		// List<OrderProduct> orderProducts = orderProductService.listOrderProductByOrderId(orderId);
		// if (!CollectionUtils.isEmpty(orderProducts)) {
		// 	showProductName = StringUtils.defaultIfBlank(orderProducts.get(0).getShowProductName(), showProductName);
		// }
		// orderPayInfoDRO.setShowProductName(showProductName);
		//
		// orderPayInfoDRO.setOriginalAmount(orderWork.getOriginalAmount());
		// orderPayInfoDRO.setDiscountAmount(orderWork.getDiscountAmount());
		// orderPayInfoDRO.setRefundAmount(orderWork.getRefundAmount());
		// orderPayInfoDRO.setPayStatus(orderWork.getPayStatus());
		// orderPayInfoDRO.setChannelPrepayStatus(orderWork.getChannelPrepayStatus());
		// orderPayInfoDRO.setPrepayStatus(orderWork.getPrepayStatus());
		// orderPayInfoDRO.setDepositStatus(orderWork.getDepositStatus());
		// orderPayInfoDRO.setMasterPayStatus(orderWork.getMasterPayStatus());
		//
		// // 渠道预付
		// Integer paidChannelPrepayAmount = null;
		// if (Objects.equals(orderWork.getChannelPrepayStatus(), PayConsts.PAY_STATUS_DONE)) {
		// 	// 已付
		// 	orderPayInfoDRO.setPaidChannelPrepayAmount(orderWork.getChannelPrepayAmount());
		// } else {
		// 	// 未付
		// 	orderPayInfoDRO.setUnPaidChannelPrepayAmount(orderWork.getChannelPrepayAmount());
		// }
		//
		// // 平台预付
		// if (Objects.equals(orderWork.getPrepayStatus(), PayConsts.PAY_STATUS_DONE)) {
		// 	// 已付
		// 	orderPayInfoDRO.setPaidPrepayAmount(orderWork.getPrepayAmount());
		// } else {
		// 	// 未付
		// 	orderPayInfoDRO.setUnPaidPrepayAmount(orderWork.getPrepayAmount());
		// }
		//
		// // 定金
		// if (Objects.equals(orderWork.getDepositStatus(), PayConsts.PAY_STATUS_DONE)) {
		// 	// 已付
		// 	orderPayInfoDRO.setPaidDepositAmount(orderWork.getDepositAmount());
		// } else {
		// 	// 未付
		// 	orderPayInfoDRO.setUnPaidDepositAmount(orderWork.getDepositAmount());
		// }
		//
		// // 工程师收款金额
		// if (Objects.equals(orderWork.getMasterPayStatus(), PayConsts.PAY_STATUS_DONE)) {
		// 	// 已付
		// 	orderPayInfoDRO.setPaidMasterAmount(orderWork.getMasterAmount());
		// } else {
		// 	// 未付
		// 	orderPayInfoDRO.setUnPaidMasterAmount(orderWork.getMasterAmount());
		// }
		//
		// // 已付金额（总的）
		// Integer paidAmount = Optional.ofNullable(orderPayInfoDRO.getPaidChannelPrepayAmount()).orElse(0)
		// 		+ Optional.ofNullable(orderPayInfoDRO.getPaidPrepayAmount()).orElse(0)
		// 		+ Optional.ofNullable(orderPayInfoDRO.getPaidDepositAmount()).orElse(0)
		// 		+ Optional.ofNullable(orderPayInfoDRO.getPaidMasterAmount()).orElse(0);
		//
		// // 待付金额（总的）
		// Integer unPaidAmount = Optional.ofNullable(orderPayInfoDRO.getUnPaidChannelPrepayAmount()).orElse(0)
		// 		+ Optional.ofNullable(orderPayInfoDRO.getUnPaidPrepayAmount()).orElse(0)
		// 		+ Optional.ofNullable(orderPayInfoDRO.getUnPaidDepositAmount()).orElse(0)
		// 		+ Optional.ofNullable(orderPayInfoDRO.getUnPaidMasterAmount()).orElse(0);
		//
		// orderPayInfoDRO.setPaidAmount(paidAmount);
		// orderPayInfoDRO.setUnPaidAmount(unPaidAmount);
		//
		// logger.info("[{}]工单支付信息[{}]", orderId, orderPayInfoDRO);
		// return com.zmn.common.dto2.ResponseDTO.success(orderPayInfoDRO);
	}

	/**
	 * 获取支付状态
	 *l
	 * @param baseRequestDIO
	 * @return 0 不需要支付，1 需要支付，2 已支付，3 提示用户支付
	 */
	@Override
	public ResponseDTO<Integer> getPayStatus(BaseRequestDIO baseRequestDIO) {
		return ResponseUtil.responseFail("接口被废弃，请调新接口");
		//
		// ResponseDTO<Integer> responseDTO;
		//
		// try {
		// 	// 完成前检测
		// 	CompleteDTO completeDTO = BeanMapper.map(baseRequestDIO, CompleteDTO.class);
		// 	zsNormalMasterWorkBService.checkComplete(completeDTO);
		//
		// 	OrderWork orderWork = orderWorkService.findOrderWorkByKey(baseRequestDIO.getOrderId(), baseRequestDIO.getWorkId());
		// 	int payFlag = zsOrderPayBService.getPayFlag(orderWork);
		//
		// 	// 手动同步工单位置以备某些支付方式没有经纬度
		// 	if (Objects.equals(GlobalConsts.ORDER_PAY_FLAG_ALERT_USER_PAY, payFlag) || Objects.equals(AppConsts.ORDER_PAY_FLAG_UNPAID, payFlag)) {
		// 		OrderWorkPositionManualSyncDIO dio = new OrderWorkPositionManualSyncDIO(baseRequestDIO.getLongitude(), baseRequestDIO.getLatitude(), Lists.newArrayList(OrderLogConsts.ORDER_LOG_TYPE_PAY, OrderLogConsts.ORDER_LOG_TYPE_COMPLETE), baseRequestDIO.getMasterName());
		// 		orderWorkPositionBService.manualSyncOrderPosition(orderWork, dio);
		// 	}
		//
		// 	if (Objects.equals(payFlag, GlobalConsts.ORDER_PAY_FLAG_ALERT_USER_PAY)) {// 特殊渠道提示用户支付
		// 		responseDTO = ResponseUtil.responseSuccessData(payFlag);
		// 		return responseDTO;
		// 	}
		//
		// 	// 未支付的订单，特定条件的（58到家同城公寓渠道和大客户订单）需要特殊处理
		// 	if (Objects.equals(AppConsts.ORDER_PAY_FLAG_UNPAID, payFlag)) {
		//
		// 		// 58到家-同城公寓  2020-05-20 by lhl
		// 		// 啄木鸟调“发起补充支付“接口同步补尾款金额至58（注：58返回成功即为默认支付成功，工程师收款额即为渠道代收金额）
		// 		// 啄木鸟发起完成：啄木鸟调“同步订单完成“接口同步完成至58（以调取支付链接返回成功为节点工单状态置为已完成）
		// 		if (Objects.equals(DaoJia58Consts.CHANNEL_ID_APARTMENT, orderWork.getChannelId())) {
		// 			// TODO -lhl 58到家-同城公寓
		// 			daoJia58Service.secondPay4apartmentOrder(orderWork.getOrderId());
		// 			payFlag = AppConsts.ORDER_PAY_FLAG_PAID;
		// 		}
		// 		// 大客户直接用余额支付
		// 		else if (Objects.equals(OrderConsts.ORDER_SOURCE_TYPE_BCUSTOMER, orderWork.getSourceType())) {
		// 			// 查询大客户帐号
		// 			ResponseDTO<FicoAccountBizuserDRO> remoteRepsDTO = ficoAccountBizuserRemoteService.findByUserId(orderWork.getUserId());
		// 			// 余额检测
		// 			if (remoteRepsDTO.getStatusBool() && remoteRepsDTO.getData() != null) {
		// 				FicoAccountBizuserDRO ficoAccount = remoteRepsDTO.getData();
		// 				Integer balanceTotalAmount = Optional.ofNullable(ficoAccount.getBalanceTotalAmount()).orElse(0);
		// 				if (balanceTotalAmount >= orderWork.getMasterAmount()) {// 余额够用
		// 					// 支付调用
		// 					ZsOrderPayDTO zsOrderPayDTO = new ZsOrderPayDTO();
		// 					zsOrderPayDTO.setPayChannelId(PayConsts.PAY_CHANNEL_PLATFORM_BALANCEAMOUNT);
		// 					zsOrderPayDTO.setPayType(PayConsts.PAY_TYPE_INTO);
		// 					zsOrderPayDTO.setFromBank(String.valueOf(ficoAccount.getFicoAccountId()));
		// 					zsOrderPayDTO.setOrderId(orderWork.getOrderId());
		// 					zsOrderPayDTO.setWorkId(orderWork.getWorkId());
		// 					zsOrderPayDTO.setOperatorType(GlobalConsts.OPERATE_USER_TYPE_MASTER);
		// 					zsOrderPayDTO.setOperatorId((long) Optional.ofNullable(baseRequestDIO.getMasterId()).orElse(0));
		// 					zsOrderPayDTO.setOperator(baseRequestDIO.getMasterName());
		// 					zsOrderPayDTO.setLongitude(baseRequestDIO.getLongitude());
		// 					zsOrderPayDTO.setLatitude(baseRequestDIO.getLatitude());
		// 					zsOrderPayDTO.setFicoAccountId(ficoAccount.getFicoAccountId());
		// 					zsOrderPayDTO.setUserId(ficoAccount.getUserId());
		// 					zsOrderPayDTO.setAccountType(FicoConsts.ACC_GOVBIZ);
		// 					zsOrderPayDTO.setSyncFlag(GlobalConsts.YES); // 同步支付
		// 					PayRepsDRO payRepsDRO = zsOrderPayBService.payMasterAmount(zsOrderPayDTO);
		// 					PayResultDTO payResultDTO = payRepsDRO.getPayResultDTO();
		// 					if (payResultDTO != null) {
		// 						// 更新支付结果
		// 						com.zmn.pay.common.dto.PayResultDTO newPayResultDTO = JSON.parseObject(JSON.toJSONString(payResultDTO), com.zmn.pay.common.dto.PayResultDTO.class);
		// 						zsOrderWorkAmountBService.updateMasterAmountPayResult(newPayResultDTO);
		// 						// 更新完成
		// 						zsNormalMasterWorkBService.completeOrder(completeDTO);
		// 						payFlag = AppConsts.ORDER_PAY_FLAG_PAID;
		// 					}
		// 				}
		// 			}
		// 		}
		//
		// 	}
		//
		// 	responseDTO = ResponseUtil.responseSuccessData(payFlag);
		// } catch (Exception e) {
		// 	responseDTO = super.responseDTO(e);
		// }
		//
		// return responseDTO;
	}

	/**
	 * 获取支付渠道和支付方式
	 *
	 * @param payChannelDIO
	 * @return
	 */
	@Override
	public ResponseDTO<OrderPayChannelDRO> getPayChannelList(OrderPayChannelDIO payChannelDIO) {
		return ResponseUtil.responseFail("接口被废弃，请调新接口");
		//
		// List<OrderPayChannelDRO> orderPayChannelDROS = Lists.newArrayList();
		//
		// // 工程师收款支付，判断是否支持分账。支持分账只返回银联一个支付渠道
		// OrderWork orderWork = orderWorkService.findOrderWorkByKeySrcMaster(payChannelDIO.getOrderId(), payChannelDIO.getWorkId());
		//
		// log.info("ZsNormalOrderPayRemoteService##getPayChannelList##【{}】【{}】",payChannelDIO,orderWork);
		// // XieWenBing 必须在第三方支付的渠道特殊处理：58到家直约平台.....
		// if (orderWork.getChannelId() == OrderConsts.CHANNEL_ID_DJ58_DAG) {
		// 	log.info("订单渠道为：58到家直约API,订单支付:渠道支付.......");
		// 	OrderPayChannelDRO dj58OrderPayChannelDRO = new OrderPayChannelDRO();
		// 	dj58OrderPayChannelDRO.setPayChannelId(PayConsts.PAY_CHANNEL_PLATFORM_CHANNEL);
		// 	dj58OrderPayChannelDRO.setPayChannelName("58直约");
		// 	dj58OrderPayChannelDRO.setPayTypeList(Lists.newArrayList(PayConsts.PAY_TYPE_QR));
		// 	orderPayChannelDROS.add(dj58OrderPayChannelDRO);
		// 	return ResponseUtil.responseSuccessItems(orderPayChannelDROS);
		// }
		//
		// // XieWenBing 必须在第三方支付的渠道特殊处理：雅管家平台.....2020/08/05
		// if (yajuleService.determinYajuleChannel(orderWork.getChannelId())) {
		// 	log.info("订单渠道为：雅管家平台渠道,订单支付:渠道支付.......");
		// 	OrderPayChannelDRO yajuleOrderPayChannelDRO = new OrderPayChannelDRO();
		// 	yajuleOrderPayChannelDRO.setPayChannelId(PayConsts.PAY_CHANNEL_PLATFORM_CHANNEL);
		// 	yajuleOrderPayChannelDRO.setPayChannelName("雅管家渠道");
		// 	yajuleOrderPayChannelDRO.setPayTypeList(Lists.newArrayList(PayConsts.PAY_TYPE_QR));
		// 	orderPayChannelDROS.add(yajuleOrderPayChannelDRO);
		// 	return ResponseUtil.responseSuccessItems(orderPayChannelDROS);
		// }
		//
		// // huangyifeng 必须在第三方支付的渠道特殊处理：58同城精选平台.....
		// if (Objects.equals(orderWork.getChannelId(), Tc58Consts.CHANNEL_ID_JX) ||
		// 		Objects.equals(orderWork.getChannelId(), Tc58Consts.CHANNEL_ID_JX_PIPE) ||
		// 		Objects.equals(orderWork.getChannelId(), Tc58Consts.CHANNEL_ID_JX_CLOCK)) {
		// 	log.info("订单渠道为：58同城精选API,订单支付:渠道支付.......");
		// 	OrderPayChannelDRO dj58OrderPayChannelDRO = new OrderPayChannelDRO();
		// 	dj58OrderPayChannelDRO.setPayChannelId(PayConsts.PAY_CHANNEL_PLATFORM_CHANNEL);
		// 	dj58OrderPayChannelDRO.setPayChannelName("58同城精选");
		// 	dj58OrderPayChannelDRO.setPayTypeList(Lists.newArrayList(PayConsts.PAY_TYPE_QR));
		// 	orderPayChannelDROS.add(dj58OrderPayChannelDRO);
		// 	return ResponseUtil.responseSuccessItems(orderPayChannelDROS);
		// }
		//
		// // 通用处理流程
		// if (Objects.equals(payChannelDIO.getAmountType(), FicoConsts.ORDER_IN_MASTER)) {
		// 	OrderDetail orderDetail = orderDetailService.findOrderDetailByKey(orderWork.getOrderId());
		// 	ResultDTO<OmsSeprAccountParamsDTO> seprAccountParams = zsOrderPayBService.getSeprAccountParams(orderWork, orderDetail);
		// 	if (seprAccountParams.isStatusBool()) {
		// 		List<Integer> payTypes = Lists.newArrayList(PayConsts.PAY_TYPE_QR);
		// 		// 是否支持银联app支付
		// 		BaseCodeMapDIO baseCodeMapDIO = new BaseCodeMapDIO();
		// 		baseCodeMapDIO.setPlat(orderWork.getPlatWork());
		// 		baseCodeMapDIO.setOneTypeId(TagConsts.TAG_ONE_TYPE_CHINAUMS_APP_PAY);
		// 		com.zmn.common.dto2.ResponseDTO<List<BaseCodeMapDRO>> codeMapRemote = baseCodeMapListRemoteService.listByDIO(baseCodeMapDIO);
		//
		// 		List<BaseCodeMapDRO> items = codeMapRemote.getData();
		// 		boolean canChinaumsAppPay = codeMapRemote.isSuccess() && (items != null && items.stream().anyMatch(e -> Objects.equals(e.getStatus(), GlobalConsts.YES)));
		// 		if (canChinaumsAppPay) {
		// 			// 银联app支付
		// 			payTypes.add(PayConsts.PAY_TYPE_APP);
		// 		} else {
		// 			// 支付宝app支付
		// 			OrderPayChannelDRO aliOrderPayChannelDRO = new OrderPayChannelDRO();
		// 			aliOrderPayChannelDRO.setPayChannelId(PayConsts.PAY_CHANNEL_PLATFORM_ALIPAY);
		// 			aliOrderPayChannelDRO.setPayChannelName(PayConsts.getPayChannelName(PayConsts.PAY_CHANNEL_PLATFORM_ALIPAY));
		// 			aliOrderPayChannelDRO.setPayTypeList(Lists.newArrayList(GlobalConsts.PAY_TYPE_APP));
		// 			orderPayChannelDROS.add(aliOrderPayChannelDRO);
		// 			// 微信app支付
		// 			if (Objects.equals(orderWork.getPlatWork(),GlobalConsts.PLAT_MARK_ZMN)) {
		// 				OrderPayChannelDRO weixinOrderQrPayChannelDRO = new OrderPayChannelDRO();
		// 				weixinOrderQrPayChannelDRO.setPayChannelId(PayConsts.PAY_CHANNEL_PLATFORM_WEIXINPAY);
		// 				weixinOrderQrPayChannelDRO.setPayChannelName(PayConsts.getPayChannelName(PayConsts.PAY_CHANNEL_PLATFORM_WEIXINPAY));
		// 				weixinOrderQrPayChannelDRO.setPayTypeList(Lists.newArrayList(PayConsts.PAY_TYPE_APP));
		// 				orderPayChannelDROS.add(weixinOrderQrPayChannelDRO);
		// 			}
		// 		}
		// 		OrderPayChannelDRO chinaumspayOrderPayChannelDRO = new OrderPayChannelDRO();
		// 		chinaumspayOrderPayChannelDRO.setPayChannelId(PayConsts.PAY_CHANNEL_THIRD_CHINAUMS);
		// 		chinaumspayOrderPayChannelDRO.setPayChannelName(PayConsts.getPayChannelName(PayConsts.PAY_CHANNEL_THIRD_CHINAUMS));
		// 		chinaumspayOrderPayChannelDRO.setPayTypeList(Lists.newArrayList(payTypes));
		// 		orderPayChannelDROS.add(chinaumspayOrderPayChannelDRO);
		// 		if (Objects.equals(10109, orderWork.getChannelId())) {
		// 			OrderPayChannelDRO yiOrderPayChannelDRO = OrderPayChannelDRO.builder()
		// 					.payChannelId(PayConsts.PAY_CHANNEL_PLATFORM_YIPAY)
		// 					.payTypeList(Lists.newArrayList(PayConsts.PAY_TYPE_QR))
		// 					.build();
		// 			orderPayChannelDROS.add(yiOrderPayChannelDRO);
		// 		}
		// 		log.debug("支付渠道返回==>{}",orderPayChannelDROS);
		// 		return ResponseUtil.responseSuccessItems(orderPayChannelDROS);
		// 	} else {
		// 		logger.info("[{}]不支持银联支付[{}]", orderWork.getWorkId(), seprAccountParams.getMessage());
		// 	}
		// }
		//
		// // 支付宝
		// OrderPayChannelDRO aliOrderPayChannelDRO = new OrderPayChannelDRO();
		// aliOrderPayChannelDRO.setPayChannelId(PayConsts.PAY_CHANNEL_PLATFORM_ALIPAY);
		// aliOrderPayChannelDRO.setPayTypeList(Lists.newArrayList(PayConsts.PAY_TYPE_QR, PayConsts.PAY_TYPE_APP));
		// orderPayChannelDROS.add(aliOrderPayChannelDRO);
		// // 微信支付
		// ArrayList<Integer> weixinPayTypes = Lists.newArrayList(PayConsts.PAY_TYPE_QR);
		// OrderPayChannelDRO weixinOrderQrPayChannelDRO = new OrderPayChannelDRO();
		// weixinOrderQrPayChannelDRO.setPayChannelId(PayConsts.PAY_CHANNEL_PLATFORM_WEIXINPAY);
		// if (Objects.equals(orderWork.getPlatWork(),GlobalConsts.PLAT_MARK_ZMN)) {
		// 	weixinPayTypes.add(PayConsts.PAY_TYPE_APP);
		// }
		// weixinOrderQrPayChannelDRO.setPayTypeList(weixinPayTypes);
		// orderPayChannelDROS.add(weixinOrderQrPayChannelDRO);
		// if (Objects.equals(payChannelDIO.getPlat(), GlobalConsts.PLAT_MARK_ZMN)) {
		// 	// 工行支付
		// 	/*OrderPayChannelDRO icbcOrderPayChannelDRO = new OrderPayChannelDRO();
		// 	icbcOrderPayChannelDRO.setPayChannelId(GlobalConsts.PAY_CHANNEL_PLATFORM_ICBCPAY);
		// 	icbcOrderPayChannelDRO.setPayTypeList(Lists.newArrayList(GlobalConsts.PAY_TYPE_H5));
		// 	orderPayChannelDROS.add(icbcOrderPayChannelDRO);*/
		// 	// 翼支付-开通广州
		// 	/*
		// 	if (Objects.equals(orderWork.getCityId(), 440100) || Objects.equals(10109, orderWork.getChannelId())) {
		// 		OrderPayChannelDRO yiOrderPayChannelDRO = OrderPayChannelDRO.builder()
		// 				.payChannelId(PayConsts.PAY_CHANNEL_PLATFORM_YIPAY)
		// 				.payTypeList(Lists.newArrayList(PayConsts.PAY_TYPE_QR))
		// 				.build();
		// 		orderPayChannelDROS.add(yiOrderPayChannelDRO);
		// 	}*/
		// }
		// orderPayChannelDROS.forEach(e -> e.setPayChannelName(PayConsts.getPayChannelName(e.getPayChannelId())));
		// log.debug("支付渠道返回==>{}",orderPayChannelDROS);
		// return ResponseUtil.responseSuccessItems(orderPayChannelDROS);
	}

	/**
	 * 预付款支付
	 * @param orderPayDIO
	 * @return
	 */
	@Override
	public ResponseDTO<OrderPayDRO> payPrepaidAmount(OrderPayDIO orderPayDIO) {
		return ResponseUtil.responseFail("接口被废弃，请调新接口");
		// ZsOrderPayDTO zsOrderPayDTO = BeanMapper.map(orderPayDIO, ZsOrderPayDTO.class);
		// // 操作人设置
		// zsOrderPayDTO.setOperatorType(orderPayDIO.getOperatorType());
		// zsOrderPayDTO.setOperatorId(Optional.ofNullable(Long.valueOf(orderPayDIO.getOperatorId())).orElse(0L));
		// zsOrderPayDTO.setOperator(orderPayDIO.getOperator());
		// try {
		// 	PayRepsDRO payRepsDRO = zsOrderPayBService.payPrepaidAmount(zsOrderPayDTO);
		// 	// DRO转换
		// 	OrderPayDRO orderPayDRO = BeanMapper.map(payRepsDRO, OrderPayDRO.class);
		// 	// 微信小程序或公众号支付，返回微信jspay模型
		// 	if (payRepsDRO.getWexinJspayDRO() != null) {
		// 		WexinJspayDRO weixinDRO = BeanMapper.map(payRepsDRO.getWexinJspayDRO(), WexinJspayDRO.class);
		// 		orderPayDRO.setWexinJspayDRO(weixinDRO);
		// 	}
		// 	return ResponseUtil.responseSuccessData(orderPayDRO);
		// } catch (Exception e) {
		// 	return super.responseDTO(e);
		// }
	}

	/**
	 * 定金支付
	 *
	 * @param orderPayDIO
	 * @return
	 */
	@Override
	public ResponseDTO<OrderPayDRO> payDepositAmount(OrderPayDIO orderPayDIO) {
		return ResponseUtil.responseFail("接口被废弃，请调新接口");

		// ZsOrderPayDTO zsOrderPayDTO = BeanMapper.map(orderPayDIO, ZsOrderPayDTO.class);
		// // 操作人设置
		// zsOrderPayDTO.setOperatorType(GlobalConsts.OPERATE_USER_TYPE_MASTER);
		// zsOrderPayDTO.setOperatorId(Optional.ofNullable(Long.valueOf(orderPayDIO.getMasterId())).orElse(0L));
		// zsOrderPayDTO.setOperator(orderPayDIO.getMasterName());
		//
		// try {
		// 	PayRepsDRO payRepsDRO = zsOrderPayBService.payDepositAmount(zsOrderPayDTO);
		// 	// DRO转换
		// 	OrderPayDRO orderPayDRO = BeanMapper.map(payRepsDRO, OrderPayDRO.class);
		// 	return ResponseUtil.responseSuccessData(orderPayDRO);
		// } catch (Exception e) {
		// 	return super.responseDTO(e);
		// }
	}

	/**
	 * 工程师收款支付
	 *
	 * @param orderPayDIO
	 * @return
	 */
	@Override
	public ResponseDTO<OrderPayDRO> payMasterAmount(OrderPayDIO orderPayDIO) {
		return ResponseUtil.responseFail("接口被废弃，请调新接口");
		// ZsOrderPayDTO zsOrderPayDTO = BeanMapper.map(orderPayDIO, ZsOrderPayDTO.class);
		// // 操作人设置
		// zsOrderPayDTO.setOperatorType(Optional.ofNullable(orderPayDIO.getOperatorType()).orElse(GlobalConsts.OPERATE_USER_TYPE_MASTER));
		// zsOrderPayDTO.setOperatorId(Optional.ofNullable(orderPayDIO.getOperatorId()).orElse(Long.valueOf(Optional.ofNullable(orderPayDIO.getMasterId()).orElse(0))));
		// zsOrderPayDTO.setOperator(Optional.ofNullable(orderPayDIO.getOperator()).orElse(orderPayDIO.getMasterName()));
		//
		// try {
		// 	PayRepsDRO payRepsDRO = zsOrderPayBService.payMasterAmount(zsOrderPayDTO);
		// 	// DRO转换
		// 	OrderPayDRO orderPayDRO = BeanMapper.map(payRepsDRO, OrderPayDRO.class);
		// 	log.debug("工程师收款支付==>{}", orderPayDRO);
		// 	return ResponseUtil.responseSuccessData(orderPayDRO);
		// } catch (Exception e) {
		// 	return super.responseDTO(e);
		// }
	}

}
